(de javaDef (ClassObject SimpleClass)
  (unless (thread SimpleClass
            (staticMember "class")
            eval
            (= ClassObject) )
    (let (SuperclassObjects (thread ClassObject
                              javaClasses
                              reverse
                              (map+ filter
                                (quote (SuperclassObject)
                                  (thread SuperclassObject
                                    (= ClassObject)
                                    not) ) )
                              (map+ filter
                                (quote (SuperclassObject)
                                  (thread SuperclassObject
                                    (= (javaClass "java.lang.Object") )
                                    not) ) ) )
          ClassObjects (thread ClassObject
                         (java "getClasses")
                         arrayAsList
                         (map+ filter
                           (quote (SubclassObject)
                             (thread SubclassObject
                               (java "getSuperclass")
                               (member SuperclassObjects)
                               not) ) ) )
          Methods (thread ClassObject
                    (java "getMethods")
                    arrayAsList)
          Fields (thread ClassObject
                    (java "getFields")
                    arrayAsList) )
      (for ClassObject SuperclassObjects
        (javaDef ClassObject
          (simpleClassName ClassObject) ) )
      (javaDefStatic ClassObject Methods Fields SimpleClass)
      (javaDefInstance Methods Fields SimpleClass)
      (for ClassObject ClassObjects
        (javaDef ClassObject
          (pack SimpleClass "."
            (simpleClassName ClassObject) ) ) ) ) ) )